SessionExtend

Syntax: @SessionExtend <object>

only one object can be added for each use of the command.

@SessionExtend myExtend

The above example line of code will result in the PREVINPUTS section of the html code containing not only the user inputs from dialogs but also the object 'myExtend' and its value. If you run an application with the web preview and view the source you should be able to see the session string associated with the PREVINPUTS parameter.

<INPUT TYPE="HIDDEN" NAME="PREVINPUTS" VALUE="02010001000Cname[1,1]=u1020100010010myExtend=True">

The session string grows as progress is made through the application. The session string is the means by which the runtime replays the application from the start every time control is passed back to the server. Therefore to avoid needless execution of database calls the SessionExtend command can be used to extend the session string with the results of the first database call and then as progress is made by the user through the application the database will not be re-queried.

@If myExtend.isEmpty = True
  @Assign myExtend = 'False'
  @If (name = 'u1') or (name = 'u2')
    @Assign myExtend = 'True'
  @Endif
  @SessionExtend myExtend
@Endif